<el-form ref="form" :model="form" :rules="rules" label-width="140px">
    <el-row :gutter="10">
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="归属法人" prop="GWEPMLEGAL">
                <el-input v-model="form.GWEPMLEGAL_NAME" readOnly clearable @clear="clearMlegal">
                    <i class="el-icon-search el-input__icon" @click="openGwepmlegal" slot="suffix"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="ERP组织" prop="GWEPPLANT">
                <el-input v-model="form.GWEPPLANT" readOnly>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="单据日期" prop="GWEPDOCDATE">
                <el-date-picker
                        type="date"
                        v-model="form.GWEPDOCDATE"
                        value-format="yyyy-MM-dd"
                        style="width: 100%" disabled>
                </el-date-picker>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="核销单号" prop="GWEPDOCNO">
                <el-input v-model="form.GWEPDOCNO" readonly></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="客户" prop="GWEP003">
                <el-input v-model="form.GWEP003_NAME" readonly clearable>
                    <i class="el-icon-search el-input__icon" @click="openGwep003" slot="suffix"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="归属部门" prop="GWEP005">
                <el-input v-model="form.GWEP005_NAME" readonly clearable>
                    <i class="el-icon-search el-input__icon" @click="openGwep005" slot="suffix"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="业务人员" prop="GWEP004">
                <el-input v-model="form.GWEP004_NAME" readonly clearable>
                    <i class="el-icon-search el-input__icon" @click="openGwep004" slot="suffix"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
            <div class="pos-re" style="margin-top: 5px;">
                <div class="pos-ab" style="margin-bottom: 10px;">
                    <el-button type="primary" size="small"
                               @click="addHead">添加
                    </el-button>
                    <el-button type="primary" size="small"
                               @click="delHead">删除
                    </el-button>
                </div>
                <div class="table-responsive">
                    <table id="gwei022_head_table"
                           class="layui-table"
                           lay-size="sm"
                           lay-filter="gwei022_head_table">
                    </table>
                </div>
            </div>
        </el-col>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
            <div class="pos-re" style="margin-top: 5px;">
                <div class="pos-ab" style="margin-bottom: 10px;">
                    <el-button type="primary" size="small"
                               @click="addDetail">添加
                    </el-button>
                    <el-button type="primary" size="small"
                               @click="delDetail">删除
                    </el-button>
                </div>
                <div class="table-responsive">
                    <table id="gwei022_detail_table"
                           class="layui-table"
                           lay-size="sm"
                           lay-filter="gwei022_detail_table">
                    </table>
                </div>
            </div>
        </el-col>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" style="text-align: right;margin-top: 10px;">
            <el-button icon="icon iconfont icon-23" size="mini" @click="cancle">关闭</el-button>
            <el-button type="warning" icon="icon iconfont icon-21" size="mini" :disabled="isCheck" @click="saveData">保存
            </el-button>
        </el-col>
    </el-row>
</el-form>
<script type="text/html" id="table-toolbar1">
</script>
<script>
    require(["pc/crm/gwei022_edit"], $.noop);
</script>